package com.atwisdom.star.controller;

import com.alibaba.fastjson.JSONObject;
import com.atwisdom.star.common.vo.ActionData;
import com.atwisdom.star.common.vo.ResultInfo;
import com.atwisdom.star.core.bsl.functionClass.impl.BiBslServiceImpl;
import com.atwisdom.star.exception.pojo.BusinessException;
import com.atwisdom.star.log.aop.StarAnnotation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/bi")
public class BiController {
    private BiBslServiceImpl biBslService;
    @Autowired
    public void setBiBslService(BiBslServiceImpl biBslService) {
        this.biBslService = biBslService;
    }


    /**
     *
     * @param actionDataList 接收参数据
     * @return 返回结果
     * @throws BusinessException  业务异常
     */
    @StarAnnotation
    @PostMapping
    public ResultInfo<?> responseHelpFactory(@RequestBody List<ActionData<JSONObject>> actionDataList) throws BusinessException {
        return biBslService.responseFactory(actionDataList);
    }
}
